home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
3_0
/
DOUBLEDE
/
SCROLLPO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1988-06-19
|
877b
|
46 lines
#include <ControlMgr.h>
#define SCROLLBARWIDTH 15
poshscroll(theHScroll,theWindow)
ControlHandle theHScroll;
WindowPtr theWindow;
{
Rect r;
r = theWindow->portRect;
r.top = r.bottom - SCROLLBARWIDTH;
r.right -= SCROLLBARWIDTH;
--r.left;
++r.bottom;
++r.right;
HideControl(theHScroll);
SizeControl(theHScroll,r.right-r.left,r.bottom-r.top);
MoveControl(theHScroll,r.left,r.top);
ShowControl(theHScroll);
ValidRect(&(**theHScroll).contrlRect);
}
posvscroll(theVScroll,theWindow)
ControlHandle theVScroll;
WindowPtr theWindow;
{
Rect r;
r = theWindow->portRect;
r.left = r.right - SCROLLBARWIDTH;
r.bottom -= SCROLLBARWIDTH;
--r.top;
++r.bottom;
++r.right;
HideControl(theVScroll);
SizeControl(theVScroll,r.right-r.left,r.bottom-r.top);
MoveControl(theVScroll,r.left,r.top);
ShowControl(theVScroll);
ValidRect(&(**theVScroll).contrlRect);
}